﻿@using Personalblog.Model.ViewModels;
@using PersonalblogServices.Articels.Dto
@model ArticelRes

<style>
    .Postbtn{
        position:fixed;
        bottom:15%;
        right:10%;
    }
    .Topup{
        color:#000000;
        font-size:18px
    }
</style>
@await Html.PartialAsync("Widgets/BackToTop", new BackToTopViewModel {IsShowText = false})
@if (TempData["msg"] != null)
{
    <div class="container mt-3">
        <div class="alert alert-info d-flex align-items-center alert-dismissible fade show" role="alert">
            <i class="fa fa-info-circle me-2"></i>
            <div>
                <div>@Html.Raw(TempData["msg"])</div>
                <button type="button" class="btn-close" aria-label="Close" data-bs-dismiss="alert"></button>
            </div>
        </div>
    </div>
}
<div class="container">
    <div class="row">
        <div class="col-lg-3">
            <div id="sidebar" class="p-3 sticky-lg-top">
                @* <h5>Table of Contents</h5> *@
                <div class="d-flex align-items-center pb-3 mb-3 link-dark text-decoration-none border-bottom">
                    <span class="bi me-2">
                        <i class="bi bi-menu-button-wide-fill"></i>
                    </span>
                    <span class="fs-5 fw-semibold">文章目录</span>
                </div>

                <div id="post-toc-container">
                </div>
            </div>
        </div>
        <div class="col-lg-9" id="goTop">
            <header class="post-header py-3 mb-3">
                <div class="post-title h3 font-weight-bold">@Model.Title</div>
                <div class="border-bottom my-3"></div>
                <div class="post-meta">
                    <div class="d-flex justify-content-between">
                        <div>
                            发布：
                            <span>@Model.CreationTime.ToShortDateString()</span>
                            <span>@Model.CreationTime.ToString("hh:mm")</span>
                        </div>
                        <div>
                            更新：
                            @Model.LastUpdateTime.ToShortDateString()
                            @Model.LastUpdateTime.ToString("hh:mm")
                        </div>
                    </div>

                    <div class="d-flex justify-content-between">
                        <nav aria-label="breadcrumb">
                            <ol class="breadcrumb">
                                <li class="breadcrumb-item active">博客</li>
                                <li class="breadcrumb-item">
                                    <a asp-controller="Blog" asp-action="List"
                                       asp-route-categoryId="@Model.Categories.Id">
                                        @Model.Categories.Name
                                    </a>
                                </li>
                            </ol>
                        </nav>
                        <div>字数：@Model.Content.Length.ToString()</div>
                    </div>
                </div>
            </header>
            <div id="post-markdown-content" class="post-content">
                <textarea id="append-test" style="display:none;">@Model.Content</textarea>
            </div>
            <div class="my-3 text-center">
                <span style="font-size: 1.5em; color: #bababa">_EOF_</span>
            </div>
        </div>
    </div>
</div>
<script src="~/js/jquery.min.js"></script>
<script src="~/js/bootstrap-treeview.js"></script>
<script src="~/editormd/flowchart.min.js"></script>
<script src="~/editormd/jquery.flowchart.min.js"></script>
<script src="~/editormd/marked.min.js"></script>
<script src="~/editormd/prettify.min.js"></script>
<script src="~/editormd/raphael.min.js"></script>
<script src="~/editormd/sequence-diagram.min.js"></script>
<script src="~/editormd/underscore.min.js"></script>
<script src="~/editormd/editormd.js"></script>
<script src="~/js/blog.post.js"></script>